POV-Ray : Newsgroups : povray.general : problem: repeating rand patterns using seed in animation : Re: problem: repeating rand patterns using seed in animation Server Time
30 Jul 2024 18:23:51 EDT (-0400)
  Re: problem: repeating rand patterns using seed in animation  
From: Kenneth
Date: 25 Jan 2009 06:30:00
Message: <web.497c4cb0b528db0df50167bc0@news.povray.org>
"Kenneth" <kdw### [at] earthlinknet> wrote:

> In thinking the idea through, I decided to make a subtle change...
> ...So for frame_number 1, all is well--each created rand() value is actually
> used, and I'll call them rand #1, rand #2 and rand #3...

I made a slight mistake there (I forgot that the #while loop counter was
starting at 0, not 1--which is how I usually start my own counters.) It doesn't
affect the logic of the example in any way, but allow me to re-word that
paragraph, for clarity's sake:

"With the #while loop as-is, say that instead of pulling only one rand() value
for use in my animated scene, I want to use three different ones from the same
seed, for various things. So for frame_number 1, all is well--the first rand
value is discarded, but the next three are used, and I'll call them rand #2,
rand #3 and rand #4. But here's what happens in frame_number 2: The first and
second rand values are discarded, then #3, #4 and #5 are actually used. But two
of those are the same values that were used in frame_number 1. And so on."

Ken


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.